<template>
	<web-view class="web-view" v-if="webViewUrl" :src="webViewUrl"></web-view>
</template>

<script>
	import config from "@/utils/config";
	export default {
		data() {
			return {
				webViewUrl: null
			}
		},
		onLoad(options) {
			let url = `${config.designLocation}?origin=h5&business_id=${uni.getStorageSync('businessId')}&design_type=1&cate_id=${options.cate_id}&label_id=${options.label_id}&type=${options.type}&album_id=${options.album_id}&author_id=${options.author_id}&auth_key=${options.auth_key}`;
			this.webViewUrl = url;
			console.log(options)
		},
		onShareAppMessage() {
			console.log('分享');
		},
	}
</script>

<style>
	.web-view{
		background-color: #000;
	}
</style>
